package net.wanho.controller;

import lombok.RequiredArgsConstructor;
import net.wanho.po.AuthInfo;
import net.wanho.service.AuthInfoService;
import net.wanho.vo.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
@RequestMapping("/auth")
public class AuthController {
    private final AuthInfoService authService;
    @GetMapping("/auth-tree")
    public R getAuthTree(){
        List<AuthInfo> authInfoList = authService.authlist();
        return R.success(authInfoList);
    }
}
